package com.yunxiao.cloud.web.controller;

import com.yunxiao.cloud.common.base.BaseResultResponse;
import com.yunxiao.cloud.common.util.RedisUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description: TestController
 * @date: 2019/12/18 16:51
 * @author: yunxiao
 * @version: 1.0
 */
@Api(value = "测试管理", tags = {"各种封装的测试方法"})
@RestController
@RequestMapping("test")
public class TestController {

    @Resource
    private RedisTemplate<String, Object> redisTemplate;

    @Autowired
    private RedisUtil redisUtil;

    @ApiOperation(value = "信息", notes = "测试信息接口")
    @PostMapping("/info")
    public BaseResultResponse testApi(){

        redisUtil.set("redisUtil", "8783786723");
        redisTemplate.opsForValue().set("test","12345567734433434343434");

        return BaseResultResponse.ok();
    }
}
